package edu.sctu.practice.class01.wangxiaoqiang.practice.test_three;

/**
 * Created by admin on 2015/10/15.
 */
public class MyTime {

    private int hour;
    private int munite;
    private int second;

    public MyTime(int hour, int munite, int second) {
        this.hour = hour;
        this.munite = munite;
        this.second = second;
    }

    public void diaplay() {
        System.out.println(hour);
        System.out.println(munite);
        System.out.println(second);
    }

    public void addSecond(int sec) {
        second = second + sec;
        System.out.println(second);
    }

    public void addMinute(int min) {
        munite = munite + min;
        System.out.println(munite);
    }

    public void addHour(int hou) {
        hour = hour + hou;
        System.out.println(hour);
    }

    public void subSecond(int sec) {
        second = second - sec;
        System.out.println(second);
    }

    public void subMinute(int min) {
        munite = munite - min;
        System.out.println(munite);
    }

    public void subHour(int hou) {
        hour = hour - hou;
        System.out.println(hour);
    }


}
